package objects;

import java.io.Serializable;


public abstract class Shape implements Serializable {
	
    /**************** Attributs ****************************/
    protected double x; 		// coordonnee x
    protected double y;		// coordonnee y

    /**
     * 
     * @param x horizontal coordonate of the point to be tested
     * @param y vertical coordonate of the point to be tested
     * @return whether the point whose coordanates are (x,y) is in the shape.
     */
    public abstract boolean isInside(double x,double y);

    /**************** Methodes d'acces **********************/

    /**
     * @return the width of the shape
     */
    public abstract double getWidth();



    /**
     * 
     * @return the height of the shape
     */
    public abstract double getHeight();

    public static void main(String[] args) {
    }
    
    /**
     * @return the horizontal coordonate of the left upper corner
     */
    public double getX() {
	return x;
    }

    /**
     * @return the vertical coordonate of the left upper corner
     */
    public double getY() {
	return y;
    }

    public abstract String xmlDump();

    /**
     * @param x1
     * @param y1
     * @param x2
     * @param y2
     * @return
     */
    public abstract double getLenghtSuperpositionOfVector(double x1, double y1, double x2, double y2);		
}
